# bash.sh
echo "Console list:"
who
echo -e "This Console is: \c"
tty

read -p "please input outpu tty number:" tty_number
RET=`expr match $tty_number "[0-9][0-9]*$"`
if [ ${RET} -gt 0 ]; then
	sudo gdb -tui ./app -tty /dev/pts/$tty_number
else
	echo "Input Error"
fi


